import type { AppRouteRecordRaw } from '@/router/types'
import { t } from '@/hooks/web/useI18n'

const Layout = () => import('@/layout/Layout.vue')

const evalRouter: AppRouteRecordRaw = {
  path: '/eval',
  component: Layout,
  redirect: '/eval/profession',
  name: 'Eval',
  meta: {
    title: t('router.eval'),
    icon: 'ep:medal',
    alwaysShow: true
  },
  children: [
    // 基础配置
    {
      path: 'profession',
      component: () => import('@/views/eval/profession/index.vue'),
      name: 'EvalProfession',
      meta: {
        title: '职业工种',
        icon: 'ep:briefcase'
      }
    },
    {
      path: 'condition',
      component: () => import('@/views/eval/condition/index.vue'),
      name: 'EvalCondition',
      meta: {
        title: '申报条件',
        icon: 'ep:document-checked'
      }
    },
    {
      path: 'template',
      component: () => import('@/views/eval/template/index.vue'),
      name: 'EvalTemplate',
      meta: {
        title: '评价模板',
        icon: 'ep:document-copy'
      }
    },
    {
      path: 'question',
      component: () => import('@/views/eval/question/index.vue'),
      name: 'EvalQuestion',
      meta: {
        title: '题库管理',
        icon: 'ep:collection'
      }
    },
    
    // 计划管理
    {
      path: 'plan',
      component: () => import('@/views/eval/plan/index.vue'),
      name: 'EvalPlan',
      meta: {
        title: '评价计划',
        icon: 'ep:calendar'
      }
    },
    {
      path: 'subject',
      component: () => import('@/views/eval/subject/index.vue'),
      name: 'EvalSubject',
      meta: {
        title: '评价科目',
        icon: 'ep:notebook'
      }
    },
    {
      path: 'workflow',
      component: () => import('@/views/eval/workflow/index.vue'),
      name: 'EvalWorkflow',
      meta: {
        title: '工作流管理',
        icon: 'ep:operation'
      }
    },
    
    // 人员管理
    {
      path: 'evaluator',
      component: () => import('@/views/eval/evaluator/index.vue'),
      name: 'EvalEvaluator',
      meta: {
        title: '考评员管理',
        icon: 'ep:user-filled'
      }
    },
    {
      path: 'assignment',
      component: () => import('@/views/eval/assignment/index.vue'),
      name: 'EvalAssignment',
      meta: {
        title: '人员分配',
        icon: 'ep:coordinate'
      }
    },
    {
      path: 'candidate',
      component: () => import('@/views/eval/candidate/index.vue'),
      name: 'EvalCandidate',
      meta: {
        title: '参评人员',
        icon: 'ep:avatar'
      }
    },
    
    // 成绩管理
    {
      path: 'score',
      component: () => import('@/views/eval/score/index.vue'),
      name: 'EvalScore',
      meta: {
        title: '评分录入',
        icon: 'ep:edit-pen'
      }
    },
    {
      path: 'score/summary',
      component: () => import('@/views/eval/score/summary.vue'),
      name: 'EvalScoreSummary',
      meta: {
        title: '成绩汇总',
        icon: 'ep:data-analysis'
      }
    },
    
    // 监控管理
    {
      path: 'monitoring',
      component: () => import('@/views/eval/monitoring/index.vue'),
      name: 'EvalMonitoring',
      meta: {
        title: '实施监控',
        icon: 'ep:monitor'
      }
    },
    {
      path: 'supervision',
      component: () => import('@/views/eval/supervision/index.vue'),
      name: 'EvalSupervision',
      meta: {
        title: '督导检查',
        icon: 'ep:view'
      }
    },
    {
      path: 'attendance',
      component: () => import('@/views/eval/attendance/index.vue'),
      name: 'EvalAttendance',
      meta: {
        title: '考勤管理',
        icon: 'ep:clock'
      }
    },
    
    // 公告异议
    {
      path: 'announcement',
      component: () => import('@/views/eval/announcement/index.vue'),
      name: 'EvalAnnouncement',
      meta: {
        title: '公告发布',
        icon: 'ep:bell'
      }
    },
    {
      path: 'objection',
      component: () => import('@/views/eval/objection/index.vue'),
      name: 'EvalObjection',
      meta: {
        title: '异议处理',
        icon: 'ep:warning'
      }
    },
    
    // 统计报表
    {
      path: 'statistics',
      component: () => import('@/views/eval/statistics/index.vue'),
      name: 'EvalStatistics',
      meta: {
        title: '统计报表',
        icon: 'ep:pie-chart'
      }
    }
  ]
}

export default evalRouter
